recursion tree method to solve recurrences